/*  
  Copyright 2007-2010 The NGenerics Team
 (http://code.google.com/p/ngenerics/wiki/Team)

 This program is licensed under the GNU Lesser General Public License (LGPL).  You should 
 have received a copy of the license along with the source code.  If not, an online copy
 of the license can be found at http://www.gnu.org/copyleft/lesser.html.
*/
using NGenerics.DataStructures.Mathematical;
using NUnit.Framework;

namespace NGenerics.Tests.DataStructures.Mathematical.MatrixTests
{
    [TestFixture]
    public class Construction
    {
        [Test]
        public void Should_Copy_Multi_Dimensional_Array_For_Data()
        {
            var values = new double[4,3];
                
            for (var i = 0; i< 4; i++)
            {
                for (var j = 2; j>= 0; j--)
                {
                    values[i, j] = i + j;
                }
            }
                
            var m = new Matrix(4, 3, values);

            for (var i = 0; i < 4; i++)
            {
                for (var j = 2; j >= 0; j--)
                {
                    Assert.AreEqual(m[i, j], i + j);
                }
            }
                
        }
    }
}